package com.fjnu.entity;

import lombok.Data;
import lombok.AllArgsConstructor;
import lombok.NoArgsConstructor;

import java.time.LocalDateTime;
import java.util.Date;

/**
 * 文章实体类
 * 对应数据库表：tb_article
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
public class Article {
    private Integer id;
    private Integer userId;
    private String title;
    private String content;
    private Integer status;
    private String description;
    private Integer categoryId;
    private LocalDateTime createTime;
    private LocalDateTime updateTime;
    private Integer support;
    private Integer oppose;
    private Boolean recommended;
    private Boolean isTop;
    private String coverImg;

    // 自定义构造方法
    public Article(Integer userId, String title, String content, Integer categoryId) {
        this.userId = userId;
        this.title = title;
        this.content = content;
        this.categoryId = categoryId;
    }
}